<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <p>组件嵌套</p>
    <big-com></big-com>
  </div>
  <template id="big">
    <div class="big">
      <p>我是父组件</p>
      <small-com></small-com>
    </div>
  </template>
  <template id="small">
    <div class="small">
      <p>我是子组件</p>
    </div>
  </template>
  <script src="../vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data() {
        return {
        }
      },
      components: {
        bigCom: {
          template: '#big',
          components: {
            smallCom: {
              template: '#small'
            }
          }
        }
      }
    })
  </script>
</body>

</html>